package com.google.code.stalkernet.message;

/**
 * Visitor to be acceped by {@link Message} objects.
 *
 * @param <T> visit result type
 *
 * @author Mikhail Vladimirov
 */
public interface MessageVisitor <T>
{
    /**
     * Visit {@link LeafIDsMessage} object.
     *
     * @param leafIDsMessage {@link LeafIDsMessage} object to be visited
     * @return visit result
     */
    public T visitLeafIDsMessage (LeafIDsMessage leafIDsMessage);

    /**
     * Visit {@link LeafIDsAckMessage} object.
     *
     * @param leafIDsAckMessage {@link LeafIDsAckMessage} object to be visited
     * @return visit result
     */
    public T visitLeafIDsAckMessage (LeafIDsAckMessage leafIDsAckMessage);

    /**
     * Visit {@link EntriesRequestMessage} object.
     *
     * @param entriesRequestMessage {@link EntriesRequestMessage} object to be
     *        visited
     * @return visit result
     */
    public T visitEntriesRequestMessage (
        EntriesRequestMessage entriesRequestMessage);

    /**
     * Visit {@link EntriesMessage} object.
     *
     * @param entriesMessage {@link EntriesMessage} object to be visited
     * @return visit result
     */
    public T visitEntriesMessage (EntriesMessage entriesMessage);

    /**
     * Visit {@link AdvertisementsMessage} object.
     *
     * @param advertisementsMessage
     *        {@link AdvertisementsMessage} object to be visited
     * @return visit result
     */
    public T visitAdvertisementsMessage (
        AdvertisementsMessage advertisementsMessage);

    /**
     * Visit {@link AdvertisementsAckMessage} object.
     *
     * @param advertisementsAckMessage
     *        {@link AdvertisementsAckMessage} object to be visited
     * @return visit result
     */
    public T visitAdvertisementsAckMessage (
        AdvertisementsAckMessage advertisementsAckMessage);
}
